<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>       
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="js/ops.js" type="text/javascript"></script>
    <link href="css/UserCSS.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery3.min.js" type="text/javascript"></script>
</head>
<body>
    <div class="row" style="margin-top: 10px;">
    </div>
    <div class="row">
        <div class="u-menu">
            <ul class="u-nav" id="user_menu">
                <li class="item" id="user_menu_my" name="user_menu_my">
                    <h3 class="t1">
                        我的个人中心<span title="折叠"></span></h3>
                    <ul class="sub">
                        <li><a href="个人资料.jsp">个人资料</a></li><li><a href="认证管理.jsp">
                            认证管理</a></li><li><a href="密码管理.jsp">密码设置</a></li></ul>
                </li>             
                <li class="item" id="user_menu_loan" name="user_menu_loan">
                    <h3 class="t3">
                        贷款管理<a name="user_login"></a><span title="折叠"></span></h3>
                    <ul class="sub">
                           <li><a href="queryRetmsgInfo.do">我的贷款</a></li><li><a href="queryRepaymentInfo.do?nper=${Nper }">偿还贷款</a></li><li><a href="LoanStatistics.do">
                            贷款统计</a></li></ul>
                </li>
            </ul>
            <script type="text/javascript">
                var menuClosed = Ops.getCookie('menuClosed');

                $(".item h3 span").click(function () {

                    menuClosed = Ops.getCookie('menuClosed');
                    if (menuClosed == undefined || menuClosed == null) {
                        menuClosed = '';
                        Ops.setCookie('menuClosed', menuClosed);
                    }
                    //console.log(menuClosed+',click;;;');	
                    $(this).parent().parent().toggleClass('bg-slide');
                    $(this).parent().parent().find(".sub").slideToggle('fast');

                    if ($(this).attr('title') == '折叠') {
                        $(this).attr('title', '展开');
                    } else {
                        $(this).attr('title', '折叠');
                    }

                    var pid = $(this).parent().parent().attr('id');

                    if ($(this).parent().parent().hasClass('bg-slide') && menuClosed.indexOf("#" + pid + "#") == -1) {
                        var cookies = menuClosed + '#' + pid + '#';
                    } else {
                        var cookies = menuClosed.replace("#" + pid + "#", '');
                    }
                    Ops.setCookie('menuClosed', cookies);
                });

                if (menuClosed != null) {
                    var closedMatch = menuClosed.match(/([a-z_]+)/g);
                    for (var i in closedMatch) {
                        var idObj = $('#' + closedMatch[i]);
                        idObj.toggleClass('bg-slide');
                        idObj.find(".sub").hide();
                        idObj.find('h3 span').attr('title', '展开');
                    }
                } else {
                    $("#user_menu_loan h3 span").click();
                }
            </script>
        </div>
        <!-- /.u-menu -->
        <div class="u-main">
            <div class="u-tab-wrap">
                <ul class="u-tab clearfix">
                    <li class="current"><a>贷款统计</a></li></ul>
                <!-- /.u-tab -->
            </div>
            <div class="u-form-wrap" style="padding: 50px;">
                <div>
                    <table class="u-table">
                        <tbody>
                            <tr>
                                <th colspan="4">
                                    贷款统计
                                </th>
                            </tr>
                            <tr>
                                <td width="25%">
                                    总借款额
                                </td>
                                <td width="25%">
                                    <i class="red">￥${money }</i>
                                </td>
                                <td width="25%">
                                    成功借款笔数
                                </td>
                                <td width="25%">
                                	<c:if test="${money gt 0.0}">
                                    	<i class="red">1 / 1</i>
                                    </c:if>	
                                    <c:if test="${money eq 0.0}">
                                    	<i class="red">0 / 0</i>
                                    </c:if>		
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    已还本息(含奖励)
                                </td>
                                <td>
                                    <i class="red">￥${ret_money }</i>
                                </td>
                                <td>
                                    正常还清笔数
                                </td>
                                <td>
                                    <i class="red">${Nper }</i>
                                </td>
                            </tr>
                            <tr>
                  <!--               <td>
                                    待还本息(含奖励)
                                </td>
                                <td>
                                    <i class="red">￥0.00</i>
                                </td> -->
                             	<td>
                                   总计贷款期数
                                </td> 
                                <td>
                                    <i class="red">
                                    <c:forEach items="${fenqi}" var="fq">
	                                		<c:if test="${fq.fid eq ret_type}">
	                                				${fq.qishu}
	                                		</c:if>	
                                	</c:forEach></i>
                                </td>
                            <!-- </tr>
                            <tr> -->
                                <td>
                                    待还管理费
                                </td>
                                <td>
                                    <i class="red">￥88.00</i>
                                </td>
                  <!--               <td>
                                    平台代还笔数
                                </td>
                                <td>
                                    <i class="red">0</i>
                                </td> -->
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- /.u-form-wrap -->
        </div>
        <!-- /.u-main -->
    </div>
    <!-- /.row -->
</body>
</html>